package com.luoc.service;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: luoc
 * @Date: 2019/9/24 15:49
 */
public abstract class Subject {

     public List<Observer> observers = new ArrayList<>();


    public   void detach(Observer observer){
        observers.remove(observer);
    }

    public void attach(Observer observer){
        observers.add(observer);
    }

   public abstract void notifyUp();
}
